package com.gopay.remote.fundcps.model;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * 个人快捷支付卡表
 * @author yu_liu6@hnair.com
 * @date 2017-12-15 14:55:57
 */
public class FundpGopayFastpayCards extends BaseEntity {
    private static final long serialVersionUID = 6089774487378865788L;
    private Long keyId;

    private String custId;

    private String merchantId;

    private String agreementSignNo;

    private String bankCardNo;

    private String status;

    private String fundpayBindSign;

    private Integer moneyAccount;

    private String appSheetSerialNo;

    private Integer fundCustNo;

    private String transactionAccountId;

    private String acountType;

    private String authenticateFlag;

    private String bankBranchName;

    private String bankName;

    private String branchInterBankCode;

    private String certificateNo;

    private String certificateType;

    private String channelId;

    private String channelName;

    private String contractNo;

    private String depositAcctName;

    private String depositName;

    private String depositCity;

    private String depositProv;

    private String interBankCode;

    private String operOrg;

    private String otherBankName;

    private String transPassword;

    private String adsource;

    private String acceptMethod;

    private String appSheetSerialnoEx;

    private Date createdTs;

    private Date lastUpdTs;

    private String bankCode;

    private String failtureReason;

    public Long getKeyId() {
        return keyId;
    }

    public void setKeyId(Long keyId) {
        this.keyId = keyId;
    }

    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId == null ? null : custId.trim();
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId == null ? null : merchantId.trim();
    }

    public String getBankCardNo() {
        if(StringUtils.isBlank(bankCardNo)){
            return bankCardNo;
        }
        return SensitiveInfoUtils.smartDecryptWithCheck(bankCardNo);
    }

    public void setBankCardNo(String bankCardNo) {
        if(StringUtils.isBlank(bankCardNo)){
            this.bankCardNo = bankCardNo;
        } else {
            this.bankCardNo = SensitiveInfoUtils.smartEncryptWithCheck(bankCardNo.trim());
        }
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getFundpayBindSign() {
        return fundpayBindSign;
    }

    public void setFundpayBindSign(String fundpayBindSign) {
        this.fundpayBindSign = fundpayBindSign == null ? null : fundpayBindSign.trim();
    }

    public Integer getMoneyAccount() {
        return moneyAccount;
    }

    public void setMoneyAccount(Integer moneyAccount) {
        this.moneyAccount = moneyAccount;
    }

    public String getAppSheetSerialNo() {
        return appSheetSerialNo;
    }

    public void setAppSheetSerialNo(String appSheetSerialNo) {
        this.appSheetSerialNo = appSheetSerialNo == null ? null : appSheetSerialNo.trim();
    }

    public Integer getFundCustNo() {
        return fundCustNo;
    }

    public void setFundCustNo(Integer fundCustNo) {
        this.fundCustNo = fundCustNo;
    }

    public String getTransactionAccountId() {
        return transactionAccountId;
    }

    public void setTransactionAccountId(String transactionAccountId) {
        this.transactionAccountId = transactionAccountId == null ? null : transactionAccountId.trim();
    }

    public String getAcountType() {
        return acountType;
    }

    public void setAcountType(String acountType) {
        this.acountType = acountType == null ? null : acountType.trim();
    }

    public String getAuthenticateFlag() {
        return authenticateFlag;
    }

    public void setAuthenticateFlag(String authenticateFlag) {
        this.authenticateFlag = authenticateFlag == null ? null : authenticateFlag.trim();
    }

    public String getBankBranchName() {
        return bankBranchName;
    }

    public void setBankBranchName(String bankBranchName) {
        this.bankBranchName = bankBranchName == null ? null : bankBranchName.trim();
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName == null ? null : bankName.trim();
    }

    public String getBranchInterBankCode() {
        return branchInterBankCode;
    }

    public void setBranchInterBankCode(String branchInterBankCode) {
        this.branchInterBankCode = branchInterBankCode == null ? null : branchInterBankCode.trim();
    }

    public String getCertificateNo() {
        if(StringUtils.isBlank(certificateNo)){
            return certificateNo;
        }
        return SensitiveInfoUtils.smartDecryptWithCheck(certificateNo);
    }

    public void setCertificateNo(String certificateNo) {
        if(StringUtils.isBlank(certificateNo)){
            this.certificateNo = certificateNo;
        } else {
            this.certificateNo = SensitiveInfoUtils.smartEncryptWithCheck(certificateNo.trim());
        }
    }

    public String getCertificateType() {
        return certificateType;
    }

    public void setCertificateType(String certificateType) {
        this.certificateType = certificateType == null ? null : certificateType.trim();
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId == null ? null : channelId.trim();
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName == null ? null : channelName.trim();
    }

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo == null ? null : contractNo.trim();
    }

    public String getDepositAcctName() {
        return depositAcctName;
    }

    public void setDepositAcctName(String depositAcctName) {
        this.depositAcctName = depositAcctName == null ? null : depositAcctName.trim();
    }

    public String getDepositName() {
        return depositName;
    }

    public void setDepositName(String depositName) {
        this.depositName = depositName == null ? null : depositName.trim();
    }

    public String getDepositCity() {
        return depositCity;
    }

    public void setDepositCity(String depositCity) {
        this.depositCity = depositCity == null ? null : depositCity.trim();
    }

    public String getDepositProv() {
        return depositProv;
    }

    public void setDepositProv(String depositProv) {
        this.depositProv = depositProv == null ? null : depositProv.trim();
    }

    public String getInterBankCode() {
        return interBankCode;
    }

    public void setInterBankCode(String interBankCode) {
        this.interBankCode = interBankCode == null ? null : interBankCode.trim();
    }

    public String getOperOrg() {
        return operOrg;
    }

    public void setOperOrg(String operOrg) {
        this.operOrg = operOrg == null ? null : operOrg.trim();
    }

    public String getOtherBankName() {
        return otherBankName;
    }

    public void setOtherBankName(String otherBankName) {
        this.otherBankName = otherBankName == null ? null : otherBankName.trim();
    }

    public String getTransPassword() {
        if(StringUtils.isBlank(transPassword)){
            return transPassword;
        }
        return SensitiveInfoUtils.smartDecryptWithCheck(transPassword);
    }

    public void setTransPassword(String transPassword) {
        if(StringUtils.isBlank(transPassword)){
            this.transPassword = transPassword;
        } else {
            this.transPassword = SensitiveInfoUtils.smartEncryptWithCheck(transPassword.trim());
        }
    }

    public String getAdsource() {
        return adsource;
    }

    public void setAdsource(String adsource) {
        this.adsource = adsource == null ? null : adsource.trim();
    }

    public String getAcceptMethod() {
        return acceptMethod;
    }

    public void setAcceptMethod(String acceptMethod) {
        this.acceptMethod = acceptMethod == null ? null : acceptMethod.trim();
    }

    public String getAppSheetSerialnoEx() {
        return appSheetSerialnoEx;
    }

    public void setAppSheetSerialnoEx(String appSheetSerialnoEx) {
        this.appSheetSerialnoEx = appSheetSerialnoEx == null ? null : appSheetSerialnoEx.trim();
    }

    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    public String getFailtureReason() {
        return failtureReason;
    }

    public void setFailtureReason(String failtureReason) {
        this.failtureReason = failtureReason == null ? null : failtureReason.trim();
    }

    public String getAgreementSignNo() {
        return agreementSignNo;
    }

    public void setAgreementSignNo(String agreementSignNo) {
        this.agreementSignNo = agreementSignNo;
    }

    public String getBankCode() {
        return bankCode;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }
}